package cn.com.yto56.coresystem.business.msg.web.job;


import cn.com.yto56.coresystem.business.msg.web.biz.IYtoMsgBiz;
import cn.com.yto56.coresystem.business.msg.web.biz.impl.YtoMsgBizImpl;
import cn.com.yto56.coresystem.common.msg.util.quartz.AbstractJobBean;
import cn.com.yto56.coresystem.common.msg.util.quartz.JobBean;
import cn.com.yto56.coresystem.common.msg.util.quartz.ScheduleJob;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by wangrui on 2016/5/3.
 */
@DisallowConcurrentExecution
@JobBean(cron = "${msg.job.sendMsg.cron}", thread = "${msg.job.sendMsg.threadNum}")
public class SendMsgJob extends AbstractJobBean {
	private static final Logger logger = LoggerFactory.getLogger(ReSendMsgJob.class);

    public SendMsgJob() {
        super(SendMsgJob.class, YtoMsgBizImpl.class);
    }

    @Override
    public void run(JobExecutionContext context, ScheduleJob scheduleJob, Object service) {
    	logger.info(this.getClass().getSimpleName()+"sendMsgJob---> begin()");
        ((IYtoMsgBiz) service).sendMsg();
        logger.info(this.getClass().getSimpleName()+"sendMsgJob---> end()");
    }
}
